package com.top.application.redis;

import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;

import redis.clients.jedis.Jedis;

public class GetSerilizaRedis {
	public static void main(String[] args) {
		//连接本地的 Redis 服务
        Jedis jedis = new Jedis("localhost");
        System.out.println("连接成功");
        //设置 redis 字符串数据
        //jedis.set("runoobkey", "www.runoob.com");
        // 获取存储的数据并输出
        System.out.println("redis 存储的字符串为: "+ jedis.get("auth:64829d75-081a-490d-a86c-27871e013b3c").toString());
        System.out.println("-----------------");
        System.out.println(SerializeUtil.unserialize(jedis.get("auth:64829d75-081a-490d-a86c-27871e013b3c").getBytes()));
	}
}
